<template>
  <div>
    <div class="card-header">
      <span>{{ title }}</span>
      <i class="el-icon-warning-outline"></i>
    </div>
    <div class="card-content">{{ count }}</div>
    <div class="card-charts">
      <!-- 公共插槽,展示不同内容 -->
      <slot name="charts"></slot>
    </div>
    <div class="card-footer">
      <!-- 公共插槽,展示不同内容 -->
      <slot name="footer"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'detail',
  props: ['title', 'count'],
}
</script>

<style scoped>
/* 图标样式 */
.card-header {
  display: flex;
  justify-content: space-between;
  color: #d9d9d9;
}

.card-content{
  font-size:30px;
  padding:10px 0;
}

.card-charts{
  height:40px;
}

.card-footer{
  border-top:solid 1px #eee;
  padding-top:10px;
  font-size:18px;
}
</style>